package com.haolp.sys.pojo;

import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @Author 韩
 * @Date: 2021/10/05/ 14:48
 * @Description
 */
@Component
@Lazy(true)
public class DefaultCache {
    public DefaultCache(){
        System.out.println("DefaultCache对象创建了...");
    }
    public void sayHello(){
        System.out.println("我要说英语");
    }
    @PostConstruct
    public void init(){
        System.out.println("对象初始化了");

    }
    @PreDestroy
    public void destroy(){
        System.out.println("对象升天了...");

    }}
